package com.ku_wan.cms.action;

import java.util.List;

import com.ku_wan.cms.model.News;
import com.ku_wan.cms.service.NewsService;
import com.opensymphony.xwork2.ActionSupport;

public class NewsAction extends ActionSupport {

	private static final long serialVersionUID = 3051392001499768525L;
	
	private NewsService newsService;
	
	private List<News> news;

	@Override
	public String execute() throws Exception {
		news = newsService.getNewsAll();
		return SUCCESS;
	}

	public NewsService getNewsService() {
		return newsService;
	}

	public void setNewsService(NewsService newsService) {
		this.newsService = newsService;
	}

	public List<News> getNews() {
		return news;
	}

	public void setNews(List<News> news) {
		this.news = news;
	}
}
